<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ajax</title>
</head>
<body>
    <button id="btn">请求数据</button>
<script type="text/javascript">
    document.querySelector("#btn").onclick = function () {
        let xml = new XMLHttpRequest()
        xml.open("GET", ' http://127.0.0.1:8888/api/seller', true)
        xml.onreadystatechange = function () {
            if (xml.readyState === 4 && xml.status === 200){
                console.log(xml.responseText)
            }
        }
        xml.send()
    }

</script>
</body>
</html>